package com.zzyl.mapper;

import com.zzyl.dto.AppointDto;
import com.zzyl.dto.GetAppointPageDto;
import com.zzyl.entity.AppointCount;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CostomerMapper {
    Reservation selectByMobile(AppointDto dto);

    void insertAppoint(Reservation reservation);

    List<ReservationVo> getPageAppoint(GetAppointPageDto dto);

    void updateAppoint(Reservation reservation);

    void updateStatus(Reservation reservation);

    List<AppointCount> getCountByTime(@Param("min") LocalDateTime min,@Param("max") LocalDateTime max);

    Integer getCancelCount(@Param("id") Long id, @Param("min") LocalDateTime min,@Param("max") LocalDateTime max);

    List<ReservationVo> getAllAppoint();
}
